package com.leapp.sk.ui.activity.notify

import android.os.Bundle
import com.example.mvp.activity.BaseActivityMVP
import com.example.mvp.binder.BaseDataBinder
import com.leapp.sk.R
import com.leapp.sk.bean.NotifyObjEntity
import com.leapp.sk.binder.BaseBinder
import com.leapp.sk.viewdelegate.notify.NotifyDelegate

/**
 * 通知界面
 * @author  chaohaipeng  on 2018/7/26.
 */
class NotifyActivity: BaseActivityMVP<NotifyDelegate>() {
    override fun initView(p0: Bundle?) {
        viewDelegate.setTitle(resources.getString(R.string.string_notify_title))
    }

    override fun initDate() {
        val mList= mutableListOf<NotifyObjEntity>()
        val notifyObjEntity1 = NotifyObjEntity()
        notifyObjEntity1.content="端午节放假，我园定于6月16...."
        notifyObjEntity1.creatTime=System.currentTimeMillis()
        notifyObjEntity1.unReadNum=0
        notifyObjEntity1.type=0
        val notifyObjEntity2 = NotifyObjEntity()
        notifyObjEntity2.content="家长协助宝贝完成小猪佩奇绘画"
        notifyObjEntity2.creatTime=System.currentTimeMillis()
        notifyObjEntity2.unReadNum=2
        notifyObjEntity2.type=1
        val notifyObjEntity3 = NotifyObjEntity()
        notifyObjEntity3.content="中医院来我园对3-5岁宝贝进行体检"
        notifyObjEntity3.creatTime=System.currentTimeMillis()
        notifyObjEntity3.unReadNum=2
        notifyObjEntity3.type=2
        val notifyObjEntity4 = NotifyObjEntity()
        notifyObjEntity4.content="客户端开启请假功能"
        notifyObjEntity4.creatTime=System.currentTimeMillis()
        notifyObjEntity4.unReadNum=2
        notifyObjEntity4.type=3
        val notifyObjEntity5 = NotifyObjEntity()
        notifyObjEntity5.content="客户端开启请假功能"
        notifyObjEntity5.creatTime=System.currentTimeMillis()
        notifyObjEntity5.unReadNum=2
        notifyObjEntity5.type=4
        mList.add(notifyObjEntity1)
        mList.add(notifyObjEntity2)
        mList.add(notifyObjEntity3)
        mList.add(notifyObjEntity4)
        mList.add(notifyObjEntity5)
        viewDelegate.initAdapter(mList)
    }

    override fun bindEvenListener() {
    }

    override fun getDelegateClass(): Class<NotifyDelegate> {
        return NotifyDelegate::class.java
    }

    override fun getDataBinder(): BaseDataBinder<*, *> {
        return BaseBinder()
    }
}